/**
 * Created by python on 19-3-6.
 */
var vm = new Vue({
    el: '#app1',
    data:{
        host:HOST,
        user_id: sessionStorage.user_id || localStorage.user_id,
        token: sessionStorage.token || localStorage.token,
        username: sessionStorage.username || localStorage.username,

        ture_picture: '',
        true_name: '',
        gender:'',
        birthday:'',
        major:'',

    },
    mounted: function () {
        axios.get(this.host + '/users/archives', {
            headers: {
                'Authorization': 'JWT ' + this.token
            },
            responseType: 'json'
        })
            .then(response => {
                this.ture_picture = response.data.ture_picture;
                this.true_name = response.true_name;
                this.gender = response.data.gender;
                this.birthday = response.data.birthday;
                this.major = response.data.major;
                this.mobile = response.data.user.mobile;

            })
            .catch(error => {
                alert(error.response.data);
            });
    }
    })